package com.hansheng.entity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by GoldenMan on 2017/6/4.
 */
@Entity
@Table(name = "v_semiproduct", schema = "hansheng")
public class VSemiproductEntity {
    private String outFormNo;
    private int spid;
    private Integer outId;
    private int sid;
    private Integer operator;
    private Integer length;
    private Integer width;
    private Integer height;
    private Integer count;
    private Double weightThe;
    private Double weightAct;
    private Timestamp finishedTime;
    private int status;
    private String name;
    private String position;
    private int msid;
    private String msNo;

    @Basic
    @Column(name = "out_form_no", nullable = false, length = 255)
    public String getOutFormNo() {
        return outFormNo;
    }

    public void setOutFormNo(String outFormNo) {
        this.outFormNo = outFormNo;
    }

    @Id
    @Column(name = "spid", nullable = false)
    public int getSpid() {
        return spid;
    }

    public void setSpid(int spid) {
        this.spid = spid;
    }

    @Basic
    @Column(name = "out_id", nullable = true)
    public Integer getOutId() {
        return outId;
    }

    public void setOutId(Integer outId) {
        this.outId = outId;
    }

    @Basic
    @Column(name = "sid", nullable = false)
    public int getSid() {
        return sid;
    }

    public void setSid(int sid) {
        this.sid = sid;
    }

    @Basic
    @Column(name = "operator", nullable = true)
    public Integer getOperator() {
        return operator;
    }

    public void setOperator(Integer operator) {
        this.operator = operator;
    }

    @Basic
    @Column(name = "length", nullable = true)
    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

    @Basic
    @Column(name = "width", nullable = true)
    public Integer getWidth() {
        return width;
    }

    public void setWidth(Integer width) {
        this.width = width;
    }

    @Basic
    @Column(name = "height", nullable = true)
    public Integer getHeight() {
        return height;
    }

    public void setHeight(Integer height) {
        this.height = height;
    }

    @Basic
    @Column(name = "count", nullable = true)
    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    @Basic
    @Column(name = "weight_the", nullable = true, precision = 0)
    public Double getWeightThe() {
        return weightThe;
    }

    public void setWeightThe(Double weightThe) {
        this.weightThe = weightThe;
    }

    @Basic
    @Column(name = "weight_act", nullable = true, precision = 0)
    public Double getWeightAct() {
        return weightAct;
    }

    public void setWeightAct(Double weightAct) {
        this.weightAct = weightAct;
    }

    @Basic
    @Column(name = "finished_time", nullable = false)
    public Timestamp getFinishedTime() {
        return finishedTime;
    }

    public void setFinishedTime(Timestamp finishedTime) {
        this.finishedTime = finishedTime;
    }

    @Basic
    @Column(name = "status", nullable = false)
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 255)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "position", nullable = true, length = 255)
    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    @Basic
    @Column(name = "msid", nullable = false)
    public int getMsid() {
        return msid;
    }

    public void setMsid(int msid) {
        this.msid = msid;
    }

    @Basic
    @Column(name = "msNo", nullable = true, length = 255)
    public String getMsNo() {
        return msNo;
    }

    public void setMsNo(String msNo) {
        this.msNo = msNo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        VSemiproductEntity that = (VSemiproductEntity) o;

        if (spid != that.spid) return false;
        if (sid != that.sid) return false;
        if (status != that.status) return false;
        if (msid != that.msid) return false;
        if (outFormNo != null ? !outFormNo.equals(that.outFormNo) : that.outFormNo != null) return false;
        if (outId != null ? !outId.equals(that.outId) : that.outId != null) return false;
        if (operator != null ? !operator.equals(that.operator) : that.operator != null) return false;
        if (length != null ? !length.equals(that.length) : that.length != null) return false;
        if (width != null ? !width.equals(that.width) : that.width != null) return false;
        if (height != null ? !height.equals(that.height) : that.height != null) return false;
        if (count != null ? !count.equals(that.count) : that.count != null) return false;
        if (weightThe != null ? !weightThe.equals(that.weightThe) : that.weightThe != null) return false;
        if (weightAct != null ? !weightAct.equals(that.weightAct) : that.weightAct != null) return false;
        if (finishedTime != null ? !finishedTime.equals(that.finishedTime) : that.finishedTime != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (position != null ? !position.equals(that.position) : that.position != null) return false;
        if (msNo != null ? !msNo.equals(that.msNo) : that.msNo != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = outFormNo != null ? outFormNo.hashCode() : 0;
        result = 31 * result + spid;
        result = 31 * result + (outId != null ? outId.hashCode() : 0);
        result = 31 * result + sid;
        result = 31 * result + (operator != null ? operator.hashCode() : 0);
        result = 31 * result + (length != null ? length.hashCode() : 0);
        result = 31 * result + (width != null ? width.hashCode() : 0);
        result = 31 * result + (height != null ? height.hashCode() : 0);
        result = 31 * result + (count != null ? count.hashCode() : 0);
        result = 31 * result + (weightThe != null ? weightThe.hashCode() : 0);
        result = 31 * result + (weightAct != null ? weightAct.hashCode() : 0);
        result = 31 * result + (finishedTime != null ? finishedTime.hashCode() : 0);
        result = 31 * result + status;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (position != null ? position.hashCode() : 0);
        result = 31 * result + msid;
        result = 31 * result + (msNo != null ? msNo.hashCode() : 0);
        return result;
    }
}
